package com.xuecheng.test.demo.demo;


import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class demo01 {
    public static void main(String[] args) throws Exception {
        demo01 d= new demo01();

        d.longToDate(1);
        int a = -2;
        System.out.println((1<<31)-1);
        System.out.println(Integer.toBinaryString(a));

    }

    public Date stringToDate(String str) throws Exception {
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = df.parse(str);
        return date;
    }

    public Date longToDate(long dateLong){
        Date date = new Date(1562774400000L);
        //date.setTime();
        System.out.println(date);
        return date;
    }

}
//        111011101011110110110100
//11111111000100010100001001001100